// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 专利精选类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022-12-29
 */
public enum ButlerPatentTypeEnum {
    ALL(0, "全部"),
    //    ELECTROTHERMAL(1, "电热"),
//    COMBUSTION(2, "燃热"),
//    PURIFICATION(3, "净水"),
//    KITCHEN(4, "厨电"),
//    IOT(5, "IoT"),
    INDUSTRY_DYNAMICS(1, "行业动态"),
    RETRIEVAL_TRAINING(2, "检索培训"),
    SPECIAL_TRAINING(3, "专题培训"),

    OTHER(6, "其他");

    private int value;

    private String name;

    ButlerPatentTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        ButlerPatentTypeEnum arrObj[] = ButlerPatentTypeEnum.values();
        for (ButlerPatentTypeEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }
}
